app.service('courseService',function($http){

    //读取列表数据绑定到表单中
    this.findAll=function(){
        return $http.get('../course/getCourse.do');
    }

    //根据id查询课程
    this.findOne=function(id){
        return $http.get('../course/findCourseById.do?id='+id);
    }

    //修改
    this.update=function(entity){
        return $http.post('../course/updateCourse.do',entity);
    }

    //添加
    this.add=function(entity){
        return $http.post('../course/addCourse.do',entity);
    }
    //删除
    this.dele=function(ids){
        return $http.get('../course/deleteCourse.do?id='+ids);
    }
    //站内搜索
    this.search=function(searchEntity){
        return $http.post('../course/findCourseFuzzy.do',searchEntity);
    }

});